<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>添加统计页面</title>
</head>
<body>
<div class="pd-20">
	<form action="" method="post" class="form form-horizontal" id="form1">
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>页面名称：</label>
			<div class="formControls col-4">
				<input type="text" class="input-text" value="" placeholder="" id="title" name="title" datatype="*2-16" nullmsg="用户名不能为空">
			</div>
			<div class="col-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red" id="mimastar">*</span>页面地址：</label>
			<div class="formControls col-4" id="mimainput">
				<input type="text" placeholder="例：index" autocomplete="off" value="" class="input-text" datatype="*1-50" nullmsg="地址不能为空" name="name">
			</div>
			<div class="col-3"> </div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>是否启用：</label>
			<div class="formControls col-7">
				<div class="radio-box">

					<label><input type="radio" value="1" name="status" checked>&nbsp; 是</label>
				</div>
				<div class="radio-box">

					<label><input type="radio" value="0" name="status"> &nbsp;否</label>
				</div>
			</div>
			<div class="col-3"> </div>
		</div>
		

		<div class="row cl">
			<div class="col-9 col-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 

<script type="text/javascript" src="lib/Validform/5.3.2/Validform.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 
<script type="text/javascript">
var classid;//定义权限组变量

$(function(){
	// $('.skin-minimal input').iCheck({
	// 	checkboxClass: 'icheckbox-blue',
	// 	radioClass: 'iradio-blue',
	// 	increaseArea: '20%'
	// });

	var editid=getUrlParam('editid');//编辑分类id
	if(editid!=null){
	    var eidturl=API_COUNT_LIST+"?id="+editid;
	    $("#form1").attr("action", eidturl);
	    $.getJSON(eidturl,function(data){
	    	if(!checkStatus(data)) return;
	
	    		$("input[name='title']").val(data.datas.title);
	    		$("input[name='name']").val(data.datas.name);
    			$("input[name='status'][value="+data.datas.status+"]").attr("checked",true);

	    		
	        
	    })
	}else{
	    $("#form1").attr("action", API_COUNT_LIST);
	}

	// $("#form1").Validform({
	// 	tiptype:2,
 //        ajaxPost:true,
	// 	callback:function(data){
	// 		if(!checkStatus(data)) return;
	//         if(data.status=='1'){
	//            var index = parent.layer.getFrameIndex(window.name);
	//            parent.parent.layer.msg("操作成功", {icon:1,time:1000});
	//            parent.$('.btn-refresh').click();
	//            window.parent.location.reload();
	//            parent.layer.close(index);      
	//         }
	// 	}

	// });
	Validformsubmit("#form1");
});
</script>
</body>
</html>